switch: Always allow chronological downgrades
authorColin Walters <walters@verbum.org>
Fri, 4 Apr 2014 20:51:37 +0000 (16:51 -0400)
committerColin Walters <walters@verbum.org>
Fri, 4 Apr 2014 20:51:37 +0000 (16:51 -0400)
Ideally we'd have something a bit more strict, but...without
downloading the parentage, this is all we can do at the moment.

src/ostree/ot-admin-builtin-switch.c

index ad652634d623871b3479089b07926541c6620ce9..292532fe80d410aaed3cee5e8342649dd761f10e 100644 (file)
@@ -120,7 +120,12 @@ ot_admin_builtin_switch (int argc, char **argv, OstreeSysroot *sysroot, GCancell
       in_status_line = FALSE;
     }
 
-  if (!ostree_sysroot_upgrader_pull (upgrader, 0, 0, progress, &changed,
+  /* Always allow older...there's not going to be a chronological
+   * relationship necessarily.
+   */
+  if (!ostree_sysroot_upgrader_pull (upgrader, 0,
+                                     OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_ALLOW_OLDER,
+                                     progress, &changed,
                                      cancellable, error))
     goto out;